package com.tudouji.project.produce.domain;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.flow.service.pojo.BasePojo;
import com.tudouji.framework.aspectj.lang.annotation.Excel;
import com.tudouji.project.flow.domain.Flowtempnode;
import lombok.Data;

/**
 * 领料单对象 pickinglist
 *
 * @author tudouji
 * @date 2022-06-01
 */
@Data
public class Pickinglist extends BasePojo {
    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    private String guid;

    /**
     * 编号
     */
    @Excel(name = "编号")
    private String code;

    /**
     * $column.columnComment
     */
    private Long id;

    /**
     * 生产计划id
     */
    @Excel(name = "生产计划id")
    private String produceplanid;

    /**
     * 所在班组(领料单以班组为单位)
     */
    @Excel(name = "所在班组(领料单以班组为单位)")
    private String departmentid;

    /**
     * 领料类别（1-主料领料2-辅料领料）
     */
    @Excel(name = "领料类别", readConverterExp = "1=-主料领料2-辅料领料")
    private Integer picktype;

    /**
     * $column.columnComment
     */
    @Excel(name = "领料类别", readConverterExp = "$column.readConverterExp()")
    private Long deptId;

    /**
     * 下单日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "下单日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date ordertime;

    /**
     * 出库库房id
     */
    @Excel(name = "出库库房id")
    private String strmid;

    private Long strm;

    /**
     * 状态(1-待质检、2-待出库、3-已出库 4-已完成)
     */
    @Excel(name = "状态(1-待质检、2-待出库、3-已出库 4-已完成)")
    private Integer status;

    /**
     * 创建人
     */
    @Excel(name = "创建人")
    private String operatorid;

    /**
     * 最后修改时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "最后修改时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date lastupdate;

    /**
     * 工厂ID(组织id)
     */
    @Excel(name = "工厂ID(组织id)")
    private String orgid;

    private String orgname;

    /**
     * $column.columnComment
     */
    @Excel(name = "工厂ID(组织id)")
    private BigDecimal weightsum;

    /**
     * $column.columnComment
     */
    @Excel(name = "工厂ID(组织id)")
    private BigDecimal pricesum;

    /**
     * $column.columnComment
     */
    @Excel(name = "工厂ID(组织id)")
    private String flowid;

    /**
     * $column.columnComment
     */
    @Excel(name = "工厂ID(组织id)")
    private Long orgId;

    /**
     * 领料类型：1-内部生产，2-代工生产
     */
    @Excel(name = "领料类型：1-内部生产，2-代工生产")
    private Integer flag;

    /**
     * $column.columnComment
     */
    @Excel(name = "领料类型：1-内部生产，2-代工生产")
    private String deptName;

    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date createtime;

    private List<Pickinglistitem> items;

    private Integer[] stats;

    private Integer[] notInStats;

    private String[] orgIds;

    private String[] andorgIds;

    private String[] anddeptIds;

    private String statusname;
    private String keyword;
    private String search;

    private List<Flowtempnode> nodes;

    private String[] ids;

    private String departmentname;
    private String produceplanCode;
    private String produceplanName;
    private String produceplanstart;
    private String strname;
    private String picktypename;
    private String scrapapplyCount;
    private String materialretapplyCount;
    private String whinapplyCount;
    private String createName;

    private BigDecimal weightall;

    private BigDecimal sum;

    private Integer gtStats;
    @Override
    public void prepareForProcess(){
        setBusTable("pickinglist");
        setPlatformId(strm);
    }
}
